﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Pages_ManagerPages_ManagerLogin : System.Web.UI.Page
{
    ManagerBUS manager = new ManagerBUS();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        string user = txtUserName.Text;
        string pass = txtPassword.Text;
        if (manager.checkLoginManager(user, pass))
        {
            Session["userManager"] = user;
            Response.Redirect("ManagerHome.aspx");
        }
        else
        {
            Session["userManager"] = null;
            Response.Write("<script>alert('Failed')</script>");
        }
    }
}